<template>
	<view class="content1">
		<view class="page-head">
			<uni-icons class="gap-top" type="arrow-left" color="white" size="30" @click="goBack"></uni-icons>
			<text class="white-font gap-top">支付成功</text>
		</view>
		<view>
			<image src="https://dongke-common.oss-cn-shenzhen.aliyuncs.com/garage-kit/buy-success.png" class="payicon">
			</image>
			<view style="color: #a1a1a1;font-size: 28rpx;text-align: center;padding: 20rpx 0;">
				{{title}}
			</view>
		</view>
		<view class="btnbg">
			<image @click="gohome" src="../../static/icons/z-meta/gohome.png" class="lookorder"></image>
		</view>
	</view>
</template>

<script>
	export default {
		name: "mall-detail",
		data() {
			return {
				title: "",
				type: 1,
				id: null
			}
		},
		onLoad(option) {
			if (option.type) {
				this.type = option.type
				this.title = "发货成功,可在车厢-已申请，查看该商品"
			}
			if (option.id) {
				this.id = option.id
			}
			uni.$emit('reset')
		},
		methods: {
			goBack() {
				uni.navigateBack({
					delta: 1
				})
			},
			gohome() {
				uni.switchTab({
					url: '/pages/package/index'
				})
			},
			gohorder() {
				if (this.type == 2) {
					uni.switchTab({
						url: '/pages/package/index',
					})
				} else {}
			}
		}
	}
</script>

<style lang="scss">
	@import 'src/static/scss/common';

	page {
		// background-color: #0A050B;
	}

	.payicon {
		width: 710rpx;
		height: 372rpx;
		margin: 0 auto;
	}

	.page-head {
		display: flex;
		gap: 10px;
		width: 100vw;
		line-height: 88px;
	}

	.btnbg {
		display: flex;
		justify-content: center;
		align-items: center;
		margin-top: 20rpx;
		padding: 0 20rpx;
		box-sizing: border-box;
	}

	.lookorder {
		width: 348rpx;
		height: 100rpx;
	}
</style>